//
//  CYJsonInfo.m
//  CreditAddressBook
//
//  Created by Lee on 15/7/29.
//  Copyright (c) 2015年 Lee. All rights reserved.
//

#import "CYJsonInfo.h"

@implementation CYJsonInfo

- (BOOL)isSuccess {
    if (CYStringEqualTo(_success.lowercaseString, @"success")) {
        return YES;
    } else {
        return NO;
    }
}

- (BOOL)isNoLogin {
    NSString *message = self.message;
    if (!self.isSuccess && ([self.success.lowercaseString isEqualToString:@"nologin"] || [message.lowercaseString isEqualToString:@"nologin"])) {
        return YES;
    }
    return NO;
}

- (BOOL)isNoExamine {
    if (!self.isSuccess && !self.isNoLogin&& [self.success.lowercaseString isEqualToString:@"noexamine"]) {
        return YES;
    }
    return NO;
}

- (NSString *)errorCode {
    if (!_errorCode) {
        _errorCode = @"-3000";
    }
    return _errorCode;
}
@end
